package cn.maihe.elg.operation.model.enums;

/***
 * 开展业务启用状态 0已关闭 1已开启 (仅有资质材料审核后)
 */
public enum BusinessStatusEnum {
    CLOSED(0, "已关闭"),
    OPENED(1, "已开启");


    private int value;
    private String label;

    BusinessStatusEnum(int value, String label) {
        this.value = value;
        this.label = label;
    }
    public static boolean contains(int type){
        for(BusinessStatusEnum typeEnum : BusinessStatusEnum.values()){
            if(typeEnum.value == type){
                return true;
            }
        }
        return false;
    }
    public static String getValue(int type){
        for(BusinessStatusEnum typeEnum : BusinessStatusEnum.values()){
            if(typeEnum.value == type){
                return typeEnum.label;
            }
        }
        return "";
    }
    public int getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }
}
